﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/static/include/top.jsp"%>
<script>document.title="用户列表";</script>
<script type="text/javascript">
/*      $(document).ready(function() {
    	 $.getJSON("${baseURL}/role/list", function(data) {
    	        $.each(data, function(i, item) {
    	            $("#roleId").append( "<option value='" + item.id + "'>" + item.roleName + "</option>" );
    	        });
    	        $("#roleId").val("${formdata.roleId}");
    	 });
	 }); */
     
     function openEditWin(id){
    	 //openWin("查看详情","view?id="+id);
    	 //openWin("查看详情","view?id="+id,600);
    	 openWin("查看详情","view?id="+id,600,300);
     }

</script>
  <table class="tab">
   <tr>
      <td bgcolor="#FFFFFF" class="tab_td_all"><table class="tab">
        <tr>
          <td width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="45" align="left" valign="middle" bgcolor="#FFFFFF">&nbsp;<img src="${baseURL}/images/tab/header_ico_01.png" width="34" height="35" align="absmiddle" />&nbsp;<span class="blue_header">用户列表</span></td>
              </tr>
            <tr>
              <td height="3" bgcolor="#044bae"><img src="${baseURL}/images/tab/line.jpg" width="610" height="3" /></td>
            </tr>
          </table></td>
        </tr>
        </table>
 
    </tr>
    <tr>
      <td class="tab_td_all">
		<form name="searchForm" action="" method="get">
			<input type="hidden" name="p" value="1" />
			<img src="${baseURL}/images/tab/ico.png" width="20" height="10" />用户名称：
			<input type="text" name="loginName" value="${param['loginName']}" size="20" class="but_sh"/>
			&nbsp;&nbsp;&nbsp;<img src="${baseURL}/images/tab/ico.png" width="20" height="10" />
			单位名称：<input type="text" name="unitName" value="${formdata.unitName}" size="20" class="but_sh"/>&nbsp;&nbsp;&nbsp;
			<img src="${baseURL}/images/tab/ico.png" width="20" height="10" />用户类型：
	      	<select id="roleId" name="roleId" >
				<option value="">请选择..</option>
			</select>
			<a class="but_02" href="#" onclick="searchForm.submit();return false;">查询</a>
			<a class="but_02" href="#" onclick="clearInput();return false;">清空</a>
		</form>
		<script>
		function clearInput() {
			$("#roleId").val("${param['loginName']}");
			$("#loginName").val("");
			$("#unitName").val("");
		}
		</script>
    </td>
    </tr>
  </table>
  <br />
	<c:if test="${empty obj.operationResult}">
		<b>没有符合条件的记录。</b>
	</c:if>
<c:if test="${not empty obj.operationResult}">
  <table class="tab">
    <tr>
        <td width="15%" bgcolor="#999999" class="tab_td_all"><span class="white14">用户名</span></td>
		<td width="30%" bgcolor="#999999" class="tab_td_rig"><span class="white14">单位</span></td>
		<td width="10%" bgcolor="#999999" class="tab_td_rig"><span class="white14">角色</span></td>
		<td width="15%" bgcolor="#999999" class="tab_td_rig"><span class="white14">单位负责人</span></td>
		<td width="15%" bgcolor="#999999" class="tab_td_rig"><span class="white14">联系电话</span></td>
		<td bgcolor="#999999" class="tab_td_rig"><span class="white14">操作</span></td>
    </tr>
    <c:forEach var="oneRow" items="${obj.operationResult}">
    		
    <tr>
      	<td class="tab_td_all">${oneRow.userLoginname}</td>
		<td align="left" class="tab_td_rig">${oneRow.userUnit}</td>
		<td class="tab_td_rig">${oneRow.roleName}</td>
		<td class="tab_td_rig">${oneRow.userContactPerson}</td>
		<td class="tab_td_rig">${oneRow.userContactPhone}</td>
		<td class="tab_td_rig">
			<a href="editUser?id=${oneRow.id}"><img src="${baseURL}/images/tab/ico_01.png" width="16" height="16" border="0" align="absmiddle"/>修改</a>
			<a href="#" onclick="openEditWin('${oneRow.id}')"><img src="${baseURL}/images/tab/ico_01.png" width="16" height="16" border="0" align="absmiddle"/>查看</a>
		</td>
    </tr>
    </c:forEach>
    <tr>
      <td height="25" colspan="3" align="center">
	  <%@ include file="../include/listpage.jsp"%>
	  </td>
    </tr>
  </table>
</c:if>

<%@ include file="/static/include/bottom.jsp"%>
